Optimal. Leaf size=67 \[ \frac {a^2 c^2 \cos ^5(e+f x)}{7 f (c-c \sin (e+f x))^6}+\frac {a^2 c \cos ^5(e+f x)}{35 f (c-c \sin (e+f x))^5} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 67, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.115, Rules used = {2815, 2751,
2750} \begin {gather*} \frac {a^2 c^2 \cos ^5(e+f x)}{7 f (c-c \sin (e+f x))^6}+\frac {a^2 c \cos ^5(e+f x)}{35 f (c-c \sin (e+f x))^5} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2750
Rule 2751
Rule 2815
Rubi steps
\begin {align*} \int \frac {(a+a \sin (e+f x))^2}{(c-c \sin (e+f x))^4} \, dx &=\left (a^2 c^2\right ) \int \frac {\cos ^4(e+f x)}{(c-c \sin (e+f x))^6} \, dx\\ &=\frac {a^2 c^2 \cos ^5(e+f x)}{7 f (c-c \sin (e+f x))^6}+\frac {1}{7} \left (a^2 c\right ) \int \frac {\cos ^4(e+f x)}{(c-c \sin (e+f x))^5} \, dx\\ &=\frac {a^2 c^2 \cos ^5(e+f x)}{7 f (c-c \sin (e+f x))^6}+\frac {a^2 c \cos ^5(e+f x)}{35 f (c-c \sin (e+f x))^5}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.43, size = 117, normalized size = 1.75 \begin {gather*} -\frac {a^2 \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right ) \left (-35 \cos \left (\frac {1}{2} (e+f x)\right )+14 \cos \left (\frac {3}{2} (e+f x)\right )+\cos \left (\frac {7}{2} (e+f x)\right )-70 \sin \left (\frac {1}{2} (e+f x)\right )-35 \sin \left (\frac {3}{2} (e+f x)\right )+7 \sin \left (\frac {5}{2} (e+f x)\right )\right )}{140 c^4 f (-1+\sin (e+f x))^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.39, size = 118, normalized size = 1.76
method | result | size |
risch | \(-\frac {2 i a^{2} \left (35 i {\mathrm e}^{4 i \left (f x +e \right )}+35 \,{\mathrm e}^{5 i \left (f x +e \right )}-14 i {\mathrm e}^{2 i \left (f x +e \right )}-70 \,{\mathrm e}^{3 i \left (f x +e \right )}-i+7 \,{\mathrm e}^{i \left (f x +e \right )}\right )}{35 f \,c^{4} \left ({\mathrm e}^{i \left (f x +e \right )}-i\right )^{7}}\) | \(87\) |
derivativedivides | \(\frac {2 a^{2} \left (-\frac {24}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{4}}-\frac {32}{7 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{7}}-\frac {1}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1}-\frac {16}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{6}}-\frac {14}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{3}}-\frac {128}{5 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{5}}-\frac {5}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{2}}\right )}{f \,c^{4}}\) | \(118\) |
default | \(\frac {2 a^{2} \left (-\frac {24}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{4}}-\frac {32}{7 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{7}}-\frac {1}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1}-\frac {16}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{6}}-\frac {14}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{3}}-\frac {128}{5 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{5}}-\frac {5}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{2}}\right )}{f \,c^{4}}\) | \(118\) |
norman | \(\frac {\frac {2 a^{2} \left (\tan ^{9}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{c f}-\frac {12 a^{2}}{35 c f}-\frac {2 a^{2} \left (\tan ^{10}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{c f}+\frac {2 a^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{5 c f}+\frac {8 a^{2} \left (\tan ^{7}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{c f}-\frac {12 a^{2} \left (\tan ^{8}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{c f}+\frac {24 a^{2} \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{5 c f}+\frac {52 a^{2} \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{5 c f}-\frac {116 a^{2} \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{5 c f}-\frac {206 a^{2} \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{35 c f}-\frac {656 a^{2} \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{35 c f}}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{2} c^{3} \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{7}}\) | \(263\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 888 vs.
\(2 (69) = 138\).
time = 0.32, size = 888, normalized size = 13.25 \begin {gather*} \frac {2 \, {\left (\frac {2 \, a^{2} {\left (\frac {91 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac {168 \, \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {280 \, \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} - \frac {175 \, \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} + \frac {105 \, \sin \left (f x + e\right )^{5}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{5}} - 13\right )}}{c^{4} - \frac {7 \, c^{4} \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {21 \, c^{4} \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} - \frac {35 \, c^{4} \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac {35 \, c^{4} \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} - \frac {21 \, c^{4} \sin \left (f x + e\right )^{5}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{5}} + \frac {7 \, c^{4} \sin \left (f x + e\right )^{6}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{6}} - \frac {c^{4} \sin \left (f x + e\right )^{7}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{7}}} - \frac {3 \, a^{2} {\left (\frac {49 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac {147 \, \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {210 \, \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} - \frac {210 \, \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} + \frac {105 \, \sin \left (f x + e\right )^{5}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{5}} - \frac {35 \, \sin \left (f x + e\right )^{6}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{6}} - 12\right )}}{c^{4} - \frac {7 \, c^{4} \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {21 \, c^{4} \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} - \frac {35 \, c^{4} \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac {35 \, c^{4} \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} - \frac {21 \, c^{4} \sin \left (f x + e\right )^{5}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{5}} + \frac {7 \, c^{4} \sin \left (f x + e\right )^{6}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{6}} - \frac {c^{4} \sin \left (f x + e\right )^{7}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{7}}} - \frac {4 \, a^{2} {\left (\frac {14 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac {42 \, \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {35 \, \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} - \frac {35 \, \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} - 2\right )}}{c^{4} - \frac {7 \, c^{4} \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {21 \, c^{4} \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} - \frac {35 \, c^{4} \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac {35 \, c^{4} \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} - \frac {21 \, c^{4} \sin \left (f x + e\right )^{5}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{5}} + \frac {7 \, c^{4} \sin \left (f x + e\right )^{6}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{6}} - \frac {c^{4} \sin \left (f x + e\right )^{7}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{7}}}\right )}}{105 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 238 vs.
\(2 (69) = 138\).
time = 0.33, size = 238, normalized size = 3.55 \begin {gather*} -\frac {a^{2} \cos \left (f x + e\right )^{4} + 4 \, a^{2} \cos \left (f x + e\right )^{3} + 13 \, a^{2} \cos \left (f x + e\right )^{2} - 10 \, a^{2} \cos \left (f x + e\right ) - 20 \, a^{2} - {\left (a^{2} \cos \left (f x + e\right )^{3} - 3 \, a^{2} \cos \left (f x + e\right )^{2} + 10 \, a^{2} \cos \left (f x + e\right ) + 20 \, a^{2}\right )} \sin \left (f x + e\right )}{35 \, {\left (c^{4} f \cos \left (f x + e\right )^{4} - 3 \, c^{4} f \cos \left (f x + e\right )^{3} - 8 \, c^{4} f \cos \left (f x + e\right )^{2} + 4 \, c^{4} f \cos \left (f x + e\right ) + 8 \, c^{4} f + {\left (c^{4} f \cos \left (f x + e\right )^{3} + 4 \, c^{4} f \cos \left (f x + e\right )^{2} - 4 \, c^{4} f \cos \left (f x + e\right ) - 8 \, c^{4} f\right )} \sin \left (f x + e\right )\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 1074 vs.
\(2 (58) = 116\).
time = 10.86, size = 1074, normalized size = 16.03 \begin {gather*} \begin {cases} - \frac {70 a^{2} \tan ^{6}{\left (\frac {e}{2} + \frac {f x}{2} \right )}}{35 c^{4} f \tan ^{7}{\left (\frac {e}{2} + \frac {f x}{2} \right )} - 245 c^{4} f \tan ^{6}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 735 c^{4} f \tan ^{5}{\left (\frac {e}{2} + \frac {f x}{2} \right )} - 1225 c^{4} f \tan ^{4}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 1225 c^{4} f \tan ^{3}{\left (\frac {e}{2} + \frac {f x}{2} \right )} - 735 c^{4} f \tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 245 c^{4} f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} - 35 c^{4} f} + \frac {70 a^{2} \tan ^{5}{\left (\frac {e}{2} + \frac {f x}{2} \right )}}{35 c^{4} f \tan ^{7}{\left (\frac {e}{2} + \frac {f x}{2} \right )} - 245 c^{4} f \tan ^{6}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 735 c^{4} f \tan ^{5}{\left (\frac {e}{2} + \frac {f x}{2} \right )} - 1225 c^{4} f \tan ^{4}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 1225 c^{4} f \tan ^{3}{\left (\frac {e}{2} + \frac {f x}{2} \right )} - 735 c^{4} f \tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 245 c^{4} f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} - 35 c^{4} f} - \frac {280 a^{2} \tan ^{4}{\left (\frac {e}{2} + \frac {f x}{2} \right )}}{35 c^{4} f \tan ^{7}{\left (\frac {e}{2} + \frac {f x}{2} \right )} - 245 c^{4} f \tan ^{6}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 735 c^{4} f \tan ^{5}{\left (\frac {e}{2} + \frac {f x}{2} \right )} - 1225 c^{4} f \tan ^{4}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 1225 c^{4} f \tan ^{3}{\left (\frac {e}{2} + \frac {f x}{2} \right )} - 735 c^{4} f \tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 245 c^{4} f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} - 35 c^{4} f} + \frac {140 a^{2} \tan ^{3}{\left (\frac {e}{2} + \frac {f x}{2} \right )}}{35 c^{4} f \tan ^{7}{\left (\frac {e}{2} + \frac {f x}{2} \right )} - 245 c^{4} f \tan ^{6}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 735 c^{4} f \tan ^{5}{\left (\frac {e}{2} + \frac {f x}{2} \right )} - 1225 c^{4} f \tan ^{4}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 1225 c^{4} f \tan ^{3}{\left (\frac {e}{2} + \frac {f x}{2} \right )} - 735 c^{4} f \tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 245 c^{4} f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} - 35 c^{4} f} - \frac {182 a^{2} \tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )}}{35 c^{4} f \tan ^{7}{\left (\frac {e}{2} + \frac {f x}{2} \right )} - 245 c^{4} f \tan ^{6}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 735 c^{4} f \tan ^{5}{\left (\frac {e}{2} + \frac {f x}{2} \right )} - 1225 c^{4} f \tan ^{4}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 1225 c^{4} f \tan ^{3}{\left (\frac {e}{2} + \frac {f x}{2} \right )} - 735 c^{4} f \tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 245 c^{4} f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} - 35 c^{4} f} + \frac {14 a^{2} \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )}}{35 c^{4} f \tan ^{7}{\left (\frac {e}{2} + \frac {f x}{2} \right )} - 245 c^{4} f \tan ^{6}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 735 c^{4} f \tan ^{5}{\left (\frac {e}{2} + \frac {f x}{2} \right )} - 1225 c^{4} f \tan ^{4}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 1225 c^{4} f \tan ^{3}{\left (\frac {e}{2} + \frac {f x}{2} \right )} - 735 c^{4} f \tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 245 c^{4} f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} - 35 c^{4} f} - \frac {12 a^{2}}{35 c^{4} f \tan ^{7}{\left (\frac {e}{2} + \frac {f x}{2} \right )} - 245 c^{4} f \tan ^{6}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 735 c^{4} f \tan ^{5}{\left (\frac {e}{2} + \frac {f x}{2} \right )} - 1225 c^{4} f \tan ^{4}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 1225 c^{4} f \tan ^{3}{\left (\frac {e}{2} + \frac {f x}{2} \right )} - 735 c^{4} f \tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 245 c^{4} f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} - 35 c^{4} f} & \text {for}\: f \neq 0 \\\frac {x \left (a \sin {\left (e \right )} + a\right )^{2}}{\left (- c \sin {\left (e \right )} + c\right )^{4}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.45, size = 128, normalized size = 1.91 \begin {gather*} -\frac {2 \, {\left (35 \, a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{6} - 35 \, a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 140 \, a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 70 \, a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 91 \, a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 7 \, a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 6 \, a^{2}\right )}}{35 \, c^{4} f {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}^{7}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 7.30, size = 99, normalized size = 1.48 \begin {gather*} \frac {\sqrt {2}\,a^2\,\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (\frac {5\,\cos \left (3\,e+3\,f\,x\right )}{8}-\frac {105\,\sin \left (e+f\,x\right )}{8}-\frac {27\,\cos \left (2\,e+2\,f\,x\right )}{4}-\frac {121\,\cos \left (e+f\,x\right )}{8}+\frac {7\,\sin \left (2\,e+2\,f\,x\right )}{2}+\frac {7\,\sin \left (3\,e+3\,f\,x\right )}{8}+\frac {109}{4}\right )}{280\,c^4\,f\,{\cos \left (\frac {e}{2}+\frac {\pi }{4}+\frac {f\,x}{2}\right )}^7} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________